import { request } from "@/api/request";

export const $import = {
  // 运输列表接口
  getByStatus: (data) => request({
    url: '/handheld/import/importByStatus',
    method: 'post',
    data: data
  }),
  // 运输列表详情
  getDetils: (data) => request({
    url: '/handheld/import/getDetils',
    method: 'post',
    data
  }),
  // 获取交接入库
  getPutStorage: (data) => request({
    url: '/handheld/import/getPutStorage',
    method: 'post',
    data
  }),
  // 交接入库
  savePutStorage: (data) => request({
    url: '/handheld/import/savePutStorage',
    method: 'post',
    data
  }),
  // 新增船段接口
  save: data => request({
    url: '/handheld/export/save',
    method: 'post',
    data
  }),
  // 编辑船段接口
  modify: data => request({
    url: '/handheld/export/modify',
    method: 'post',
    data
  }),
  // 删除船段接口
  remove: data => request({
    url: '/handheld/export/remove',
    method: 'post',
    data
  }),
  // 下载附件
  downLoad: data => request({
    url: '/handheld/import/waybillAttachment',
    // responseType: 'blob',
    responseType: 'arraybuffer',
    method: 'post',
    data
  })
}
